package com.qujia.web.controller.payApi;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 消费扣款接口转发调用支付项目
 * @date 2023/10/21
 */
@Controller
@RequestMapping("payApi")
public class UserOrderController {

    @Autowired
    private QujiaPayApiRedirectController qujiaPayApiRedirectController;

    @PostMapping(path = {
            "/appUser/order/create",
            "/appUser/order/update",
            "/appUser/order/pay",
            "/appUser/order/cardList"
    })
    public void userOderPostApi(HttpServletRequest request,HttpServletResponse response){
        qujiaPayApiRedirectController.redirectUrl(request,response);
    }

    @GetMapping(path = {
            "/staff/listWithOil"
    })
    public void useOrderGetApi(HttpServletRequest request,HttpServletResponse response){
        qujiaPayApiRedirectController.redirectUrl(request,response);
    }

}
